package com.smart.model.convert;

import com.smart.model.dtomapper.HotWorkDtoMapper;
import com.smart.model.domain.HotWorkDO;
import com.smart.model.vo.HotWorkVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class HotWorkConvert {

    public static List<HotWorkVO> buildHotWorkVoList(List<HotWorkDO> hotWorkDOList) {
        if (CollectionUtils.isEmpty(hotWorkDOList)) {
            return Lists.newArrayList();
        }
        List<HotWorkVO> hotWorkVOList = new ArrayList<>();
        for (HotWorkDO hotWorkDO : hotWorkDOList) {
            hotWorkVOList.add(HotWorkDtoMapper.INSTANCE.do2VO(hotWorkDO));
        }

        return hotWorkVOList;
    }
}
